<!--********************* Part1:Jsp Head *********************-->

<%@ page contentType="text/html;charset=UTF-8"%>  
<%@ include file="/framework/head.jsp"%>

<!--********************* Part2:Java Code *********************-->
<%
	ObjectList tBbsList = (ObjectList)context.getSessionValue("BbsList");
	BbsPageData obj = (BbsPageData)context.getValue("BbsPageData");
	
	Bbs tOrgBbs = null;
	
	if(tBbsList.size() > 0) { 
		tOrgBbs = (Bbs)tBbsList.get(0);
	}
	
	if(tOrgBbs == null) tOrgBbs = Bbs.fetch();
	
	
	
%>
<style type="text/css">
	.bbsTable {padding:4px; border-collapse:collapse; border:solid 1px #39F; }
	.bbsTable td, div {border:solid 1px #39F; word-break: break-all; table-layout: fixed;}
</style>
<!--********************* Part3:JavaScript Code ***************-->
<script language="javascript">

var g_check_items = new Array();
var g_i = 0 ;

g_check_items[g_i++] = new CheckItem("主题","Subject",true,true,100,false,0);

g_check_items[g_i++] = new CheckItem("内容","Content",true,true,2000,false,0);

function doSave()
{
	if(!CheckInput(g_check_items)) return false;
	SetAction("saveBbs");
	frm.submit();
}
function doCancel()
{
	SetAction("backListBbs");
	frm.submit();
}

key_InitDefault();
key_RegSubmitHandler(doSave);
</script>

<%=uiBody%>>

<!--********************* Part4:Form  ***************-->

<form id=frm action="<%=Config.getSrv()%>" method="post">
<input type=hidden name="action_code">

<input type=hidden name="Id" value="">
<input type=hidden name="RelId" value="<%=tOrgBbs.getId()%>">


<%=UIManager.addEditHeadTitle("发表反馈和建议")%>


<!--********************* Part5:Edit Area  ***************-->
<%=uiEditStart%>>
<%
	int key_tab = 1 ;
%>
<%=uiEditTR %>>
	<%=uiEditTD %> colspan="2" >
	<table width="100%" >
	<%for(int i=0; i<tBbsList.size(); i++) {
		Bbs tBbs = (Bbs)tBbsList.get(i);
		
		User tUser = User.fetch(con, tBbs.getCreateUserId());
		
	%>
	<tr>
		<td align="center">
		<table  class="bbsTable">
		  <tr>
		    <td width="150px" rowspan="3" align="center"><%= tUser.getWarehouseName() + " " + tBbs.getCreateUser()%></td>
		    <td width="850px" >主题：<%=tBbs.getSubject() %></td>
		  </tr>
		  <tr>
		    <td width="850px" height="600px"><%=tBbs.getContent() %></td>
		  </tr>
		  <tr>
		    <td width="850px" align="right">发表于：<%=tBbs.getCreateTime() %></td>
		  </tr>
		</table>
		</td>
		</tr>
	<%} %>
	</table>
	</td>
</tr>
<br />
<br />
<%=uiEditTR %>>
	<%=uiEditTD %> colspan="2" align="center">
	<table width="1000px" >
<%=uiEditTR %>>
	<td colspan="2">回复主题</td>
</tr>
<%=uiEditTR %>>
	<%=uiEditTD %> align="right" width="25%"><font color="red">*</font>主题：</td>
	<%=uiEditTD %>><input class="texts" type="text" name="Subject" size="80" value="RE: <%=tOrgBbs.getSubject() %>"></td>
</tr>
<%=uiEditTR %>>
	<%=uiEditTD %> align="right" width="25%"><font color="red">*</font>内容：</td>
	<%=uiEditTD %>><textarea name="Content" rows="12" cols="80"></textarea></td>
</tr>
	</table>
	</td>
</tr>
<%=uiEditEnd%>

<!--********************* Part6:Action Area  ***************-->
<%=uiCommandStart%>>
	<%=uiCommandTR%>>
   		<%=uiCommandTD%>>                     
			<input type=button class="buttons" value="    保存   " onclick="doSave();return false;">
			<input type=button class="buttons" value="    返回   " onclick="doCancel();return false;">
		</td>
	</tr>
<%=uiCommandEnd%>
</form>

<%@ include file="/framework/foot.jsp"%>

<!--
	Author    :wangp
	FileName  :/system/base//D:\\APEP3\\JavaSourceOutput\BbsEdit.jsp
-->
